package weixinkeji.dev.dc.buy.order.check;

import sys.wx.c.components.check.CheckService;
import sys.wx.c.components.check.bean.CheckData;

public class FWYOrderCheck {

    public CheckData doFWYOrder(boolean id_must) {//如果是添加操作id还没产生，所以用变量。
        CheckData cd = CheckService.getCheckData();
        cd
                .put("order_id", CheckData.ID, id_must)
                .put("order_code", CheckData.TEXT_L + "{1,26}", true)
                .put("user_account", CheckData.TEXT_L + "{1,16}", true)
                .put("user_name", CheckData.TEXT_L + "{1,16}", true)
                .put("order_info", CheckData.TEXT, false)
                .put("room_code", CheckData.TEXT_L + "{1,26}", true)
                .put("root_name", CheckData.TEXT_L + "{1,26}", true)
                .put("order_sumprice", CheckData.NUMBER, true)
                .put("order_sort", "[0|1|2]{1}", true);

        return cd;
    }

    public class FWYOrderBCheck {

        public CheckData doFWYOrderB() {//如果是添加操作id还没产生，所以用变量。
            CheckData cd = CheckService.getCheckData();
            cd
                    //                    .put("orderb_id", CheckData.ID, id_must)
                    .put("source_id", CheckData.ID, true)
                    .put("source_sort", "[0|1|2]{1}", true)
                    .put("buy_name", CheckData.TEXT_L + "{1,26}", true)
                    .put("buy_number", CheckData.NUMBER, true)
                    .put("buy_price", CheckData.NUMBER, true)
                    .put("buy_sum", CheckData.NUMBER, true)
                    .put("order_id", CheckData.ID, true);
            return cd;
        }
    }
}
